
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
 <%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
 <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
  <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
<html:form action="/history.do?do=init"   method="get" >


<table>
		<tr>
			<td>
				<h3>History</h3>
			</td>
		</tr>
			<tr>
			<td>
				<label>Carbon balance:</label>
				<html:text property="carbonBalance" disabled="disabled"/>
			</td>
			<td>
				<button>Purchase Credits</button>
			</td>
			<td>
				<label>Current Carbon Price:</label>
				$&nbsp;<input type="text" disabled="disabled" value="1.2"/>
			</td>
		</tr>
	</table>
	<br/>
<div id="history">
<display:table name="historyForm.historyList" class="mars"  pagesize="20" id="row">
    <display:column property="historyId" title="ID" />
    <display:column property="entryDate"  format="{0,date,MM-dd-yyyy}" title="Entry Date" />
    <display:column property="carbonAmt" title="Amount Carbon Produced" />
    <display:column title="Cost"  >
    <fmt:formatNumber currencyCode="US" value="${row.carbonAmt*20}" var="amt"></fmt:formatNumber>
     $<c:out value="${amt}"/>
    </display:column>
    <display:column  title="" >
    	<button class="deleteBtn" id="${row.historyId}">Delete</button>
    </display:column>
  </display:table>
</div>

	
</html:form>